package chain;

/**
 * @Author shenhan
 * @Date: 2020/4/12 18:16
 * @Description:
 */
public class CollegeApprover extends Approver {


    public CollegeApprover(String name) {
        super(name);
    }

    @Override
    void processRequest(PurchaseRequest purchaseRequest) {
        if (purchaseRequest.getPrice() > 5000 && purchaseRequest.getPrice() <= 10000) {
            System.out.println(" 请求编号 id= " + purchaseRequest.getId() + " 被" + this.name + " 处理了");
        } else {
            System.out.println(this.name + " 处理不了");
            approver.processRequest(purchaseRequest);
        }
    }
}
